<template>
  <div class="header">
    <el-icon
      size="30px"
      color="white"
      style="margin-top: 15px; margin-left: 10px"
      v-if="isCollapse"
      @click="isCollapse = !isCollapse"
      ><CaretRight
    /></el-icon>
    <el-icon
      size="30px"
      color="white"
      style="margin-top: 15px; margin-left: 10px"
      v-if="!isCollapse"
      @click="isCollapse = !isCollapse"
      ><CaretBottom
    /></el-icon>

    <div class="title">东软环保监督系统</div>
  </div>
</template>

<script setup>
import { useMenuStore } from '@/stores/home/menu.js'
import { storeToRefs } from 'pinia'
import { CaretBottom, CaretRight } from '@element-plus/icons-vue'

const headerStore = useMenuStore()
const { isCollapse } = storeToRefs(headerStore)
</script>

<style lang="scss" scoped>
.header {
  background-color: rgb(30 64 175);
  height: 60px;
  margin: 0;
  padding: 0;
  display: flex;

  .title {
    font-size: 30px;
    font-weight: bold;
    color: white;
    line-height: 60px;
    margin-left: 10px;
  }
}
</style>
